<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection" />
	<meta content="emai=no" name="format-detection" />
	<meta charset="utf-8" />
	<title>芝士宝宝未来职业福布斯排行榜</title>
	<link rel="stylesheet" type="text/css" href="/baby/css/common.css" />
	<link rel="stylesheet" type="text/css" href="/baby/css/ranking.css" />
	<script src="/baby/js/zepto-1.1.6.js"></script>
	<script src="/baby/js/fastclick.js"></script>
	<script src="/baby/js/common.js"></script>
	<script src="/baby/js/default.js"></script>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?19f39b206aedf768b42fbc69e4e4f721";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
</head>
<body>
	<header>
		<img src="/baby/img/h_ranking.png" alt="芝士宝宝灵丹妙药" />
	</header>
	<article>
		<table>
			<thead>
				<tr>
					<td><b>名次</b></td>
					<td><b>宝宝名称</b></td>
					<td><b>行业专家数</b></td>
				</tr>
			</thead>
			<tbody>
				<?php if($all):?>
				<?php for($i=0; $i<10; $i++):?>
				<?php if($all[$i]['id'] == $self['id'] && $self['id'] > 0):?>
				<tr class="mine">
				<?php else:?>
				<tr>
				<?php endif;?>
					<td><?php echo $i+1?></td>
					<td><?php echo $all[$i]['baby_nickname']?>宝宝</td>
					<td><?php echo $all[$i]['job_count']?></td>
				</tr>
				<?php endfor;?>
				<?php endif;?>
				<?php if(!empty($self) && $self['top'] >= 11):?>
				<tr class="omit">
					<td></td>
					<td></td>
					<td></td>
				</tr>
				<tr class="mine">
					<td><?php echo $self['top']?></td>
					<td><?php echo $self['baby_nickname']?>宝宝</td>
					<td><?php echo $self['job_count']?></td>
				</tr>
				<?php endif;?>
				
			</tbody>
		</table>
		
		<?php if($self['id'] > 0 || $openId):?>
		<div class="result">
			<p><b><?php echo $self['baby_nickname']?></b>宝宝</p>
			<p>未来已经可以在<font class="special"><?php echo $self['job_count']?>个行业</font>中成为专家了呢！</p>
			<p>暂时位列未来职业福布斯排行榜的<font class="special">第<?php echo $self['top']?>名！</font></p>
		</div>
		<?php endif;?>
 	</article>
	<div class="prize" id="prize">
		<h2>
			<img src="/baby/img/t_prize.png" />
		</h2>
		<div class="list flex-wrapper flex-align-center">
			<p class="flex-1">
				<span><b>第1-3名</b><br />迪士尼家庭套票 （市场价1373元）</span>
			</p>
			<p class="flex-1">
				<img src="/baby/img/g_1.jpg" />
			</p>
		</div>
		<div class="list flex-wrapper flex-align-center">
			<p class="flex-1">
				<span><b>第4-8名</b><br />乐高探索中心门票1张（市场价180元）</span>
			</p>
			<p class="flex-1">
				<img src="/baby/img/g_2.jpg" />
			</p>
		</div>
		<div class="list flex-wrapper flex-align-center">
			<p class="flex-1">
				<span><b>第9-19名</b><br />Hape动物六面拼图积木 （世界婴童网提供）</span>
			</p>
			<p class="flex-1">
				<img src="/baby/img/g_4.jpg" />
			</p>
		</div>
		<div class="list flex-wrapper flex-align-center">
			<p class="flex-1">
				<span><b>第20-30名</b><br />宝贝儿童节欢乐基金61元</span>
			</p>
			<p class="flex-1">
				<img src="/baby/img/g_3.jpg" />
			</p>
		</div>
		<div class="list flex-wrapper flex-align-center">
			<p class="flex-1">
				<span><b>所有参与用户</b><br />芝士精美大礼包</span>
			</p>
			<p class="flex-1">
				<img data-href="/baby/gift" src="/baby/img/g_5.png" />
			</p>
		</div>
	</div>
	<div class="action-list">
		<div class="actions clear">
			<p><a class="btn" data-onhover="hover" href="/baby/gift">灵丹妙药</a></p>
			<p><a class="btn" data-onhover="hover" href="/baby/index">我也要玩</a></p>
		</div>
	</div>
	
		<script type="text/javascript">
    Zepto(function ($) {
        wx.config({
            debug: false,
            appId: '<?php echo $js_config['appId']?>',
            timestamp: <?php echo $js_config['timestamp']?>,
            nonceStr: '<?php echo $js_config['noncestr']?>',
            signature: '<?php echo $js_config['signature']?>',
            jsApiList: [
            	'onMenuShareTimeline',
            	'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
        	wx.onMenuShareTimeline({
        	    title: '<?php echo $title?>', // 分享标题
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    success: function () {
        		    var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 3},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});

        	wx.onMenuShareAppMessage({
        	    title: '<?php echo $title?>', // 分享标题
        	    desc: '<?php echo $content?>', // 分享描述
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    type: 'link', // 分享类型,music、video或link，不填默认为link
        	    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        	    success: function () {
        	        // 用户确认分享后执行的回调函数
        	    	var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 3},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});
        });
    })
	
	</script>
</body>
</html>
